bpo-45476: Convert PyFloat_AS_DOUBLE() to static inline#28961
Closed
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:macro_as
Closed
bpo-45476: Convert PyFloat_AS_DOUBLE() to static inline#28961vstinner wants to merge 1 commit intopython:mainfrom vstinner:macro_as
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:macro_as
Conversation
Convert the following macros to static inline functions to disallow using them as l-value: * PyByteArray_AS_STRING() * PyBytes_AS_STRING() * PyFloat_AS_DOUBLE() PyUnicode_AS_UNICODE() becomes an alias to PyUnicode_AsUnicode().
Member
Author
|
I convert this PR to a draft since there is disagreement: https://bugs.python.org/issue45476#msg403956 |
|
This PR is stale because it has been open for 30 days with no activity. |
Member
Author
|
I wrote PEP 670 https://www.python.org/dev/peps/pep-0670/ to decide what's the best approach to fix https://bugs.python.org/issue45476 |
Member
Author
|
The PEP 670 is not accepted yet. This PR does two things:
Since both changes seem to be controversial, I prefer to limit the change to (1): I wrote the PR #28976 for that. I abandon this PR for now. Once the (1) change will be done and the PEP 670 will be accepted, it will be non controversial to convert these macros to static inline functions. For now, I prefer to abandon this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the following macros to static inline functions to disallow
using them as l-value:
PyUnicode_AS_UNICODE() becomes an alias to PyUnicode_AsUnicode().
https://bugs.python.org/issue45476